home *** CD-ROM | disk | FTP | other *** search
- ;** Created with wIN-TRek **
- ;---------------------------
-
- .386
- .MODEL FLAT,STDCALL
- UNICODE = 0
- INCLUDE tASM\W32.INC
- INCLUDE cRACK\CRACK.ASM
- INCLUDE kEYGEN\Info.ASM
-
- extrn GetWindowThreadProcessId:PROC
- extrn OpenProcess:PROC
- extrn TerminateProcess:PROC
-
- CM_ABOUT EQU 100 ;IDz from Resource file
- CM_EXIT EQU 101
- CM_CALC EQU 102
-
- .DATA
- ;---───────════════════════════════════════════════════════════════───────----
-
- hInst DD 0
- mainhwnd DD 0
- s1 WNDCLASS <?>
- s2 MSG <?>
- s3 PAINTSTRUCT <?>
- szClassName DB "KEYGEN",0
- sziconname DB "T_ICON",0 ;name of icon in .RC file.
-
- IDC_EDIT1 DD 0 ;Edit field handle
- IDC_EDIT2 DD 0
-
- Edit_cls DB "EDIT",0
- Static_cls DB "STATIC",0
- Nada DD 0
-
- Status_txt1 DB "Status:",0
- Status_txt2 DB "cRACKED bY:",0
-
- g_hwnd DD 0
- g_message DD 0
- g_wparam DD 0
- g_lparam DD 0
-
- ;The about window - Keep it , and don't be a lamer!
- szaboutstr DB " [ This cRACK-ME was created with wIN-TRek ] ",0
- sztitlestr DB "cRACK-Me #4 Info",0 ;messagebox
-
- Cname db "filemonClass",0
- Wname db "Win95 File Monitor",0
- pID dd 0
-
- .CODE
- ;---───────════════════════════════════════════════════════════════───────----
-
- start:
- call GetModuleHandle, NULL
- mov hInst, eax
-
- Call Display_Info_window ; ■ That's in Info.ASM ■
-
- ; initialize the WndClass structure
- mov s1.w_style, CS_HREDRAW + CS_VREDRAW + CS_DBLCLKS
- mov s1.w_lpfnWndProc, offset WndPROC
- mov s1.w_cbClsExtra, 0
- mov s1.w_cbWndExtra, 0
- mov eax, hInst
- mov s1.w_hInstance, eax
- call LoadIcon, hInst, OFFSET sziconname
- mov s1.w_hIcon, eax
- call LoadCursor,NULL, IDC_ARROW
- mov s1.w_hCursor, eax
- mov s1.w_hbrBackground, COLOR_WINDOW + 2
- mov s1.w_lpszMenuName, OFFSET szClassName
- mov s1.w_lpszClassName, OFFSET szClassName
-
- call RegisterClass, OFFSET s1
-
- Call Create_window_Items ; Look Below
-
- call ShowWindow, mainhwnd,SW_SHOWNORMAL
- call UpdateWindow, mainhwnd
-
- Call SendMessage , IDC_EDIT1, WM_ENABLE, FALSE ,0
- Call Crack_proc
-
- msg_loop:
-
- Call FindWindowA , OFFSET Cname , OFFSET Wname
- cmp eax,0
- jz @Start
-
- Call GetWindowThreadProcessId, eax , OFFSET pID
- Call OpenProcess , PROCESS_TERMINATE , FALSE , pID
- Call TerminateProcess , eax , 0
-
- @Start:
- call GetMessage, OFFSET s2, 0,0,0
- cmp ax, 0
- je end_loop
- call TranslateMessage, OFFSET s2
- call DispatchMessage, OFFSET s2
- jmp msg_loop
-
- end_loop:
- call ExitProcess, s2.ms_wParam
-
- ;---───────════════════════════════════════════════════════════════───────----
- ;Create all the items that will be on the Main Form
-
- Create_window_Items PROC
-
- call CreateWindowEx, 0,OFFSET szClassName,OFFSET Crk_Title, \
- WS_OVERLAPPEDWINDOW , \
- 288,160,284,137, 0, 0, hInst, 0
- mov mainhwnd, eax
-
- call CreateWindowEx, WS_EX_CLIENTEDGE, OFFSET Edit_cls,OFFSET Nada, \
- WS_VISIBLE+WS_CHILD+ES_LEFT+ES_READONLY, \
- 95,15,150,24, mainhwnd, 0, hInst, 0
- mov IDC_EDIT1, eax
-
- Call CreateWindowEx, NULL,OFFSET Static_cls, OFFSET Status_txt1, \
- WS_VISIBLE+WS_CHILD+SS_CENTER, \
- 35,17,30h,18, mainhwnd, 0 ,hInst,0
-
- Call CreateWindowEx, NULL,OFFSET Static_cls, OFFSET Status_txt2, \
- WS_VISIBLE+WS_CHILD+SS_CENTER, \
- 10,52,60h,18, mainhwnd, 0 ,hInst,0
-
- call CreateWindowEx, WS_EX_CLIENTEDGE, OFFSET Edit_cls,OFFSET Nada, \
- WS_VISIBLE+WS_CHILD+ES_LEFT+ES_READONLY, \
- 118,50,150,24, mainhwnd, 0, hInst, 0
- mov IDC_EDIT2, eax
-
- RET
- Create_window_Items ENDP
-
- ;---───────════════════════════════════════════════════════════════───────----
- PUBLIC WndPROC
- WndPROC proc STDCALL, hwnd:DWORD, wmsg:DWORD, wparam:DWORD, lparam:DWORD
- USES ebx, edi, esi
- LOCAL hDC:DWORD
-
- mov eax,hwnd ;useful to make these static.
- mov g_hwnd,eax
- mov eax,wmsg
- mov g_message,eax
- mov eax,wparam
- mov g_wparam,eax
- mov eax,lparam
- mov g_lparam,eax
-
- xor eax,eax
- mov ax,WORD PTR g_message
- .IF ax==WM_DESTROY
- call wmdestroy ; Look Below
- .ELSEIF ax==WM_PAINT
- call wmpaint ; Look Below
- .ELSEIF ax==WM_COMMAND
- call wmcommand ; Look Below
- .ELSE
- call DefWindowProc, hwnd,wmsg,wparam,lparam
- ret
- .ENDIF
- xor eax,eax
- ret
- WndPROC ENDP
-
- ;---───────════════════════════════════════════════════════════════───────----
-
- wmpaint PROC
- call BeginPaint, hwnd,OFFSET s3
- mov hDC, eax
-
- call EndPaint, hwnd,OFFSET s3
- ret
- wmpaint ENDP
-
- wmdestroy PROC
- call ShowWindow, mainhwnd,SW_SHOWMINNOACTIVE
- call PostQuitMessage,0
- ret
- wmdestroy ENDP
-
- wmcommand PROC
- mov ax,WORD PTR g_lparam
- .IF ax==0
- mov ax,WORD PTR g_wparam
- .IF ax==CM_EXIT ;Exit
- call wmdestroy
- .ELSEIF ax==CM_ABOUT ;About message
- call MessageBox, g_hwnd, OFFSET szaboutstr, OFFSET sztitlestr, MB_OK
- .ELSEIF ax==CM_CALC
- call Crack_proc ; The call to your crack
- .ENDIF
- .ENDIF
- ret
- wmcommand ENDP
-
- ;---───────════════════════════════════════════════════════════════───────----
- ends
- end start
-